import request from "@/utils/request2";

//查询采购详细信息
export function SelectAll(map) {
  return request({
    url: "/application/selectAll",
    method: "POST",
    data: JSON.stringify(map),
    headers: {
      "Content-Type": "application/json",
    },
  });
}

//查询采购待审核状态
export function SelectApplicationAllQi(str) {
  return request({
    url: "/application/SelctaQi?str=" + str,
    method: "get",
  });
}

export function SelectListOrder(purchaseorder) {
  return request({
    url: "/application/SelectListOrder",
    method: "get",
    params: purchaseorder,
  });
}

export function SelectOrderList(purchasedetails) {
  return request({
    url: "/application/SelectOrderList",
    method: "get",
    params: purchasedetails,
  });
}

//新增到货验收
export function InsertAcceptance(map) {
  return request({
    url: "/acceptance/insert",
    method: "POST",
    data: JSON.stringify(map),
    headers: {
      "Content-Type": "application/json",
    },
  });
}

//查询到货验收
export function SelectAllAcceptance(acceptance) {
  return request({
    url: "/acceptance/selectAcceptance",
    method: "get",
    params: acceptance,
  });
}

//新增设备调拨
export function InsertAllocate(map) {
  return request({
    url: "/acceptance/insertAllocate",
    method: "POST",
    data: JSON.stringify(map),
    headers: {
      "Content-Type": "application/json",
    },
  });
}
//查询设备调拨
export function SelectAllocate(allocate) {
  return request({
    url: "/acceptance/selectAllocate",
    method: "get",
    params: allocate,
  });
}

//新增设备处理
export function InsertEquipmentDisposal(map) {
  return request({
    url: "/acceptance/insertEquipmentDisposal",
    method: "POST",
    data: JSON.stringify(map),
    headers: {
      "Content-Type": "application/json",
    },
  });
}

//查询失败处理
export function SelectEquipmentDisposal(equipmentDisposal) {
  return request({
    url: "/acceptance/selectEquipmentDisposal",
    method: "get",
    params: equipmentDisposal,
  });
}

//查看设备调拨
export function SelectAllocateList(allocate) {
  return request({
    url: "/acceptance/selectAllocateList",
    method: "get",
    params: allocate,
  });
}

//查看设备处理
export function SelectEquimentDisposalList(equipmentDisposal) {
  return request({
    url: "/acceptance/SelectEquimentDisposalList",
    method: "get",
    params: equipmentDisposal,
  });
}
